package com.wzy.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * 收藏表
 *
 * @TableName wzy_collection
 */
@TableName(value = "wzy_collection")
@Data
@EqualsAndHashCode
public class Collection implements Serializable
{
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    /**
     * 文章id
     */
    private Long articleId;
    /**
     * 收藏人的用户id
     */
    private Long userId;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date createTime;

    @TableField(exist = false)
    private Long collectionCount;

}